<template>
  <div class="card flex-col">
    <div class="card-title">{{ obj.tit }}</div>
    <div class="card-count">{{ obj.day }}</div>
    <!-- <div class="card-increase">本月新增 {{obj.day}}</div> -->
    <ul v-if="datas.length">
      <li v-for="(item, i) in datas" :key="i">
        <div>
          <i>{{ i + 1 }}</i>
          <p>{{ item.a }}</p>
        </div>
        <span>{{ item.b }}天</span>
      </li>
    </ul>
    <div v-else class="gray">暂无数据</div>

    <slot name="a" class="p1" />
  </div>
</template>

<script>
export default {
  props: {
    obj: {
      type: Object,
    },
    datas: Array,
  },
  data() {
    return {
      count: 500,
      increase: 4,
    };
  },
  mounted() {},
  methods: {
    handleFromType(type) {
      const from = ["其他来源", "朋友介绍"];
      if (type === 1) {
        return from[1];
      }
    },
  },
};
</script>
<style lang="scss">
.card-table {
  & thead {
    color: #010101;
  }
}
</style>

<style lang="scss" scoped>
i {
  font-style: normal;
}
ul {
  margin: 0 auto;
  padding: 0;
  width: 75%;
}
ul li {
  list-style: none;
  color: #848fa1;
  margin-bottom: 29px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  align-items: center;
}
ul li div {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
ul li div i {
  margin-right: 5px;
}
ul li div i {
  background: #f2f2f2;
  color: #a3a9b5;
  padding: 2px 5px;
  font-size: 13px;
}
ul li:nth-child(1) div i {
  background: #64a29a;
  color: #fff;
}
ul li:nth-child(2) div i {
  background: #88bdb7;
  color: #fff;
}
ul li:nth-child(3) div i {
  background: #b8d9d7;
  color: #fff;
}
.card {
  padding: 20px;
  border-radius: 4px;
  text-align: center;
  border: 1px solid rgba(221, 221, 221, 100);
  min-height: 492px;
}

.card-title {
  color: #414141;
  font-size: 16px;
  text-align: left;
  font-weight: bold;
}

.card-count {
  margin-top: 27px;
  color: #414141;
  font-size: 36px;
  font-weight: bold;
}

.card-increase {
  margin: 10px auto 56px;
  color: #414141;
  font-size: 16px;
}

.table-address {
  position: relative;
  margin: 0;
  color: #4e7afb;
  max-height: 40px;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.real-estate-num {
  height: 40px;
  line-height: 40px;
  color: #5ac6b7;
}

.gray {
  color: gray;
  font-size: 14px;
  margin-top: 20px;
}
</style>
